﻿using System;
using System.Collections.Generic;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Content;
using FlanProjectData.Sprites;

namespace FlanProjectData.Maps
{
    public class Tile : Sprite
    {

        #region Attributs

        public int IdTile { get; set; }
        public Rectangle Frame { get; set; } // Cut sprite

        #endregion

        #region constructors
        public Tile()
        {

        }

        public Tile(int idTile, Vector2 position)
        {
            this.IdTile = idTile;
        }
        #endregion


        #region Drawing
        /*public void Draw(SpriteBatch spriteBatch, Texture2D image)
        {
            spriteBatch.Draw(image, this.Position, Color.White);
        }
       */

        /// <summary>
        /// Draw a sprite
        /// </summary>
        /// <param name="spriteBatch">spriteBatch</param>
        /// <param name="image">Texture of th picture</param>
        /// <param name="Position">Position on screen</param>
        public void Draw(SpriteBatch spriteBatch, Texture2D image, Vector2 Position)
        {
            spriteBatch.Draw(image, Position, this.Frame, Color.White);
        }
        #endregion
    }
}
